package cn.com.zcode.core.scan;

import java.io.File;
import java.util.jar.JarEntry;

public class FileFilter implements ScanFilter<File> {
	private String fileType = null;

	public FileFilter(String fileType) {
		super();
		this.fileType = fileType;
	}

	@Override
	public File pass(File file, String packageName) {
		String fileName = file.getName();
		if (fileName.endsWith(fileType)) {
			return file;
		}
		 
		return null;
	}

	@Override
	public File pass(JarEntry entry, String packageName) {
		return null;
	}

}
